use serde::{Deserialize, Serialize};

use derivative::Derivative;

#[rbatis::crud_table(table_name:"nodes")]
#[derive(Serialize, Deserialize, Clone, Derivative, Debug)]
#[derivative(Default)]
pub struct NodeDBO {
  pub body: String,
  pub id: String,
  pub created_at: Option<i64>,
  pub updated_at: Option<i64>,
}

#[rbatis::crud_table(table_name:"edges")]
#[derive(Serialize, Deserialize, Clone, Derivative, Debug)]
#[derivative(Default)]
pub struct EdgeDBO {
  pub subject: String,
  pub predicate: String,
  pub object: String,
  pub facet: String,
  pub created_at: Option<i64>,
  pub updated_at: Option<i64>,
}
